function Test-ADRProperty
{
    <#
     .Synopsis
        Returns $true or $false depending on the property value that is being tested
        
     .Description
        This cmdlet is used to test a property on a given Domain Controller to verify it is set with a specific value.
        
     .Parameter Server
        Specifies the Name of the Domain Controller you want to test the property on.
        
     .Parameter DistinguishedName
        DistinguishedName of the Object to test.
        
     .Parameter Property
        Property name to test.
        
     .Parameter Value
        Value of the property you want to look for.
        
     .Example
        Test-ADRProperty -DomainController MyDC1 -DistinguishedName "cn=users,dc=domain,dc=com" -property wWWHomepage -Value 128970808683819671
        Description
        -----------
        Returns $true if the value is correct or $false if it missing or incorrect.
        
     .Example
        Get-ADRDomainController -site Site1 | Test-ADRProperty -DistinguishedName "cn=users,dc=domain,dc=com" -property wWWHomepage -Value 128970808683819671
        Description
        -----------
        Using Pipeline to pass in Domain Controllers.
        
     .OUTPUTS
        System.Boolean
        
     .INPUTS
        String
        
     .Link
        Test-ADRReplication
        Get-ADRProperty
        Set-ADRProperty
        
        NAME:      Test-ADRProperty
        AUTHOR:    Brandon Shell (aka BSonPosh)
        Website:   http://adreplicationmodule.codeplex.com
        LASTEDIT:  9/16/2009
        Version:   1
        #Requires -Version 2.0
    #>
    [cmdletbinding()]
    Param(
        [alias("name")]
        [alias("DC")]
        [Parameter(ValueFromPipeline=$true,mandatory=$true)]
        $DomainController,
        
        [alias("dn")]
        [ValidatePattern('^((CN|OU)=.*)*(DC=.*)*$')]
        [Parameter(mandatory=$true)]
        $DistinguishedName,
        
        [Parameter(mandatory=$true)]
        $Property,
        
        [Parameter(mandatory=$true)]
        $Value
    )
    
    Begin
    {
        Write-Verbose " [Test-ADProperty] :: `$DomainController  = $DomainController"
        Write-Verbose " [Test-ADProperty] :: `$DistinguishedName = $DistinguishedName"
        Write-Verbose " [Test-ADProperty] :: `$Property          = $Property"
        Write-Verbose " [Test-ADProperty] :: `$Value             = $Value"
    }
    
    Process
    {
        Try
        {
            Write-Verbose " [Test-ADProperty] :: Getting AD object LDAP://$DomainController/$DistinguishedName"
            $Object = [ADSI]"LDAP://$DomainController/$DistinguishedName"
            Write-Verbose " [Test-ADProperty] :: Return - [$Object]"
            Write-Verbose " [Test-ADProperty] :: Testing Property [$Property] for value [$Value]"
            Write-Verbose " [Test-ADProperty] :: Actual Value Return $($Object.$Property)"
            if($Object.$Property -eq $Value){$True}else{$false}
        }
        Catch [Exception]
        {
            Write-Host " [Test-ADProperty] :: Object [$DistinguishedName] either does not exist or DomainController [$DomainController] is invalid"
            $error[0]
        }
    }
}